package org.nokatag.system;

import java.sql.Time;
import java.util.Calendar;
import java.util.Date;
import java.util.List;



/**
 * 数据操作条件类
 * @author xiefangjian
 *
 */
public class DataWhere {
	private String 		TName=null;	//名字
	private int 		type=-1;   	//类型
	private Boolean 	TBoolean=null;//条件
	private Integer 	TInteger=null;//条件
	private String  	TString =null;//条件
	private Date 		TDate	=null;//条件
	private Double  	TDouble =null;//条件
	private Float		TFloat	=null;//条件
	private Short 		TShort	=null;//条件
	private Long  		TLong=null;//条件
	private Calendar 	TCalendar=null;//条件
	private Time 		TTime=null;//条件
	private List<?>     List = null;//条件
	private Object[]    Array = null;
	
	
	public final static int INTEGER 	=  1;
	public final static int STRING 		=  2;
	public final static int DATE 		=  3;
	public final static int DOUBLE 		=  4;
	public final static int FLOAT 		=  5;
	public final static int SHORT 		=  6;
	public final static int BOOLEAN 	=  7;
	public final static int LONG 		=  8;
	public final static int CALENDAR 	=  9;
	public final static int TIME 	    =  10;
	public final static int LIST        =  11;
	public final static int ARRAY       =  12;
	//-----------字符串----------------------------
	public DataWhere(String n,String w){
		setType(STRING);
		setTString(w);
		setTName(n);
	}
	//-----------整型----------------------------
	public DataWhere(String n,Integer w){
		setType(INTEGER);
		setTInteger(w);
		setTName(n);
	}
	//-----------日期----------------------------
	public DataWhere(String n,Date w){
		setType(DATE);
		setTDate(w);
		setTName(n);
	}
	//-----------双精度----------------------------
	public DataWhere(String n,Double w){
		setType(DOUBLE);
		setTDouble(w);
		setTName(n);
	}
	//-----------浮点型----------------------------
	public DataWhere(String n,Float w){
		setType(FLOAT);
		setTFloat(w);
		setTName(n);
	}
	//-----------短整型----------------------------
	public DataWhere(String n,Short w){
		setType(SHORT);
		setTShort(w);
		setTName(n);
	}
	//-----------Bool类型----------------------------
	public DataWhere(String n,Boolean w){
		setType(BOOLEAN);
		setTBoolean(w);
		setTName(n);
	}
	//-----------长整性----------------------------
	public DataWhere(String n,Long w){
		setType(LONG);
		setTLong(w);
		setTName(n);
	}
	//-----------时间----------------------------
	public DataWhere(String n,Time w){
		setType(TIME);
		setTTime(w);
		setTName(n);
	}
	//-----------日期对像----------------------------
	public DataWhere(String n,Calendar w){
		setType(CALENDAR);
		setTCalendar(w);
		setTName(n);
	}
	//-----------集合类型-------------------------
	public  DataWhere(String n,List<?> w){
		setType(LIST);
		setTName(n);
		setList(w);
	}
	//-----------数组类型-------------------------
	public DataWhere(String n,Object[] w){
		setType(ARRAY);
		setTName(n);
		setArray(w);
	}

	public void setType(int type) {
		this.type = type;
	}
	
	public int getType() {
		return type;
	}

	public String getTName() {
		return TName;
	}

	public void setTName(String tName) {
		TName = tName;
	}

	public Boolean getTBoolean() {
		return TBoolean;
	}

	public void setTBoolean(Boolean tBoolean) {
		TBoolean = tBoolean;
	}

	public Integer getTInteger() {
		return TInteger;
	}

	public void setTInteger(Integer tInteger) {
		TInteger = tInteger;
	}

	public String getTString() {
		return TString;
	}

	public void setTString(String tString) {
		TString = tString;
	}

	public Date getTDate() {
		return TDate;
	}

	public void setTDate(Date tDate) {
		TDate = tDate;
	}

	public Double getTDouble() {
		return TDouble;
	}

	public void setTDouble(Double tDouble) {
		TDouble = tDouble;
	}

	public Float getTFloat() {
		return TFloat;
	}

	public void setTFloat(Float tFloat) {
		TFloat = tFloat;
	}

	public Short getTShort() {
		return TShort;
	}

	public void setTShort(Short tShort) {
		TShort = tShort;
	}

	public Long getTLong() {
		return TLong;
	}

	public void setTLong(Long tLong) {
		TLong = tLong;
	}

	public Calendar getTCalendar() {
		return TCalendar;
	}

	public void setTCalendar(Calendar tCalendar) {
		TCalendar = tCalendar;
	}

	public Time getTTime() {
		return TTime;
	}

	public void setTTime(Time tTime) {
		TTime = tTime;
	}
	public List<?> getList() {
		return List;
	}
	public void setList(List<?> list) {
		List = list;
	}
	public Object[] getArray() {
		return Array;
	}
	public void setArray(Object[] array) {
		Array = array;
	}
	
}
